threads = []

threads << Thread.new{
  loop do
    puts "lancement agent"
    @machine = MachinesController.new
    @machine.agent
    puts "Thread Ping"
    Machine.PingAllMachines 
  end
}

threads.each {|t| t.join }
